<?php
namespace app\api\controller;
use think\Controller;
use app\api\model\News;
use think\Cache;
/**
 * 
 * @author sj
 *我的系统信息拉取
 */
class  Message extends  Co{
    
    
    public function SysMessageFetch()
    {
        //return view('news/news');
        $NewsModel=new News();
        $user_id=session('user_id');
        $va=cache('sin');
        if(empty($va)){
            cache('sin',time());
        }
       $res= $NewsModel->selectApoStaus($user_id);
       $ex=$NewsModel->quxiaoyuyue($user_id);
       $yiquxiao=$NewsModel->yiquxiao($user_id);
       $data_new=[];
       $data_new['status']=$res;
       $data_new['quxiao']=$ex;
       $data_new['yiquxiao']=$yiquxiao;
    //echo cache('sin');
       //dump($data_new);
      
       
       
       return view('news/news',array('res'=>$data_new));
    }
    public function e(){
        echo date('Y-m-d H:i:s',strtotime("+4 hours"));
    }
}